# Contributor: rubicon <rubicon@mailo.com>
# Maintainer:
pkgname=ocaml-mikmatch
_pkgname=mikmatch
pkgver=1.0.9
pkgrel=1
pkgdesc="OCaml syntax extension for regexps"
url="https://mjambon.github.io/mjambon2016/micmatch.html"
arch="all !riscv64" # restricted by ocaml
license="BSD-3-Clause"
depends="ocaml-runtime ocaml-camlp4 ocaml-pcre ocaml-tophide"
makedepends="
	ocaml
	ocaml-camlp4-dev
	ocaml-compiler-libs
	ocaml-findlib
	ocaml-pcre-dev
	"
options="!check"
source="$pkgname-$pkgver.tar.gz::https://github.com/mjambon/mikmatch/releases/download/v$pkgver/mikmatch-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

# 32-bit archs
case "$CARCH" in
	arm*|x86) options="$options textrels" ;;
esac

build() {
	make -j1
}

package() {
	export OCAMLFIND_DESTDIR="$pkgdir"/usr/lib/ocaml
	mkdir -vp "$OCAMLFIND_DESTDIR"
	make install
}

sha512sums="
dcf62f67b01f039e0510446267f3d4b965daa6507631da71c8562f7eeedebf9859403d0be7a2e217365af95bb818d05de38ab4987d900a4050a1c5403a66fa5c  ocaml-mikmatch-1.0.9.tar.gz
"
